#ifndef _TASKQUEUE_H
#define _TASKQUEUE_H
#include "condition.h"
#include "mutexLock.h"
#include "task.h"
#include <queue>
using std::queue;
class TaskQueue
{
public:
    TaskQueue(int queSize);
    bool empty();
    bool full();
    void push(Task task);
    Task pop();
    void wakeup();

private:
    queue<Task> _que;
    int _queSize;
    MutexLock _mutex;
    Condition _notFull;
    Condition _notEmpty;
    bool _flag;
};

#endif
